<template>
  <div id="app">
    <router-view v-slot="{ Component }">
      <transition name="fade">
        <component :is="Component" />
      </transition>
    </router-view>
    <van-tabbar v-model="active" active-color="#ff5f16" route>
      <van-tabbar-item icon="video-o" to="/film">电影</van-tabbar-item>
      <van-tabbar-item icon="home-o" to="/cinema">影院</van-tabbar-item>
      <van-tabbar-item icon="comment-o" to="/news">资讯</van-tabbar-item>
      <van-tabbar-item icon="user-o" to="/mine">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'app',
  data() {
    return {
      active: 0
    }
  }
}
</script>

<style scoped>
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
</style>
